package zuoye

import "fmt"

func main()  {
	//2.声明几个常量。
	//定义常量
	const cPATH string = "www.baidu.com"
	const PI = 3.14
	fmt.Println(cPATH,PI)
	//用常量计算面积
	const LENGTH = 11
	const WIDTH = 5
	area := LENGTH * WIDTH
	fmt.Println(area)
	const c = "memeda"
	const con2 = len(c)
	fmt.Println(con2)

	//定义多个常量
	const d,e,f int = 3,4,5
	fmt.Println(d,e,f)
	const a1,a2,a3 = 44,"memeda",false
	fmt.Println(a1,a2,a3)
	//定义常量集合
	const (
		c1 = "好人"
		c2 = 89
		c3 = true
	)
	fmt.Println(c1,c2,c3)
	//定义常量集合，未定义的常量值和上一个常量值相同
	const (
		x uint16 = 16
		y
		s = "abc"
		z

	)
	fmt.Println(x,y,s,z)
	//用于枚举，一年四季，一周七天
	const (
		SUNDAY = 0
		MONDAY = 1
		TUESDAY = 2
		WEDNESDAY = 3
		THURSDAY = 4
		FRIDAY = 5
		SATURDAY = 6
	)
}
